<html>
<head><meta charset="utf-8"><title>jemalloc · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html">jemalloc</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="147595122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147595122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147595122">(Nov 13 2018 at 14:40)</a>:</h4>
<p>I see that <code>config.toml.example</code> changed, we now have:</p>
<div class="codehilite"><pre><span></span># Link the compiler against `jemalloc`, where on Linux and OSX it should
# override the default allocator for rustc and LLVM.
#jemalloc = false
</pre></div>


<p>Did we change to not use jemalloc by default? Anybody know?</p>
<p>I bet <span class="user-mention" data-user-id="116015">@Alex Crichton</span> or <span class="user-mention" data-user-id="116122">@simulacrum</span> does =)</p>



<a name="147596112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147596112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Alex Crichton <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147596112">(Nov 13 2018 at 14:55)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> yeah jemalloc is no longer the default</p>



<a name="147602376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147602376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147602376">(Nov 13 2018 at 16:28)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> rustc still uses it though in the platforms that it was using it before - rust programs do not.</p>



<a name="147602414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147602414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147602414">(Nov 13 2018 at 16:29)</a>:</h4>
<p>how do I just make it not  be used at all?</p>



<a name="147602418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147602418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147602418">(Nov 13 2018 at 16:29)</a>:</h4>
<p>I usually disable it everywhere by default</p>



<a name="147602423"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147602423" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147602423">(Nov 13 2018 at 16:29)</a>:</h4>
<p>so that things like valgrind etc work better</p>



<a name="147602429"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147602429" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147602429">(Nov 13 2018 at 16:29)</a>:</h4>
<p>but I can't tell what's needed now</p>



<a name="147602430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147602430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147602430">(Nov 13 2018 at 16:29)</a>:</h4>
<p>@jemalloc supports valgrind on linux only</p>



<a name="147602440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147602440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147602440">(Nov 13 2018 at 16:29)</a>:</h4>
<p>so you want to disable it in rustc ? let me check</p>



<a name="147602540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147602540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147602540">(Nov 13 2018 at 16:30)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <a href="https://github.com/rust-lang/rust/pull/55660" target="_blank" title="https://github.com/rust-lang/rust/pull/55660">https://github.com/rust-lang/rust/pull/55660</a></p>



<a name="147602715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147602715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147602715">(Nov 13 2018 at 16:33)</a>:</h4>
<p>sorry wrong one: <a href="https://github.com/rust-lang/rust/pull/55238" target="_blank" title="https://github.com/rust-lang/rust/pull/55238">https://github.com/rust-lang/rust/pull/55238</a></p>



<a name="147602729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147602729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147602729">(Nov 13 2018 at 16:33)</a>:</h4>
<p>RUST_CONFIGURE_ARGS="--enable-extended --enable-profiler --enable-lldb --set rust.jemalloc"</p>



<a name="147602740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147602740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147602740">(Nov 13 2018 at 16:34)</a>:</h4>
<p>If you don't <code>--set rust.jemalloc</code> it shouldn't use it.</p>



<a name="147602809"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147602809" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147602809">(Nov 13 2018 at 16:34)</a>:</h4>
<p>in your config.toml you just put <code>jemalloc = false</code></p>



<a name="147602820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147602820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147602820">(Nov 13 2018 at 16:34)</a>:</h4>
<p>like so: <a href="https://github.com/rust-lang/rust/pull/55238/files#diff-c18ae2d8b23f1968bca15e8e349dbbf3R401" target="_blank" title="https://github.com/rust-lang/rust/pull/55238/files#diff-c18ae2d8b23f1968bca15e8e349dbbf3R401">https://github.com/rust-lang/rust/pull/55238/files#diff-c18ae2d8b23f1968bca15e8e349dbbf3R401</a></p>
<p>the config.toml.example has it commented out</p>



<a name="147603397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147603397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147603397">(Nov 13 2018 at 16:44)</a>:</h4>
<p>right, it looks like it defaults to <code>false</code></p>



<a name="147603402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147603402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147603402">(Nov 13 2018 at 16:44)</a>:</h4>
<p>which suggests to me that it does not use jemalloc at all</p>



<a name="147603406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147603406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147603406">(Nov 13 2018 at 16:44)</a>:</h4>
<p>at least, I interpret that was "uncomment is a no-op"</p>



<a name="147603689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147603689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147603689">(Nov 13 2018 at 16:48)</a>:</h4>
<p>looking through the code, it indeed appears to be disabled by default =/</p>



<a name="147603731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147603731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147603731">(Nov 13 2018 at 16:49)</a>:</h4>
<p>you can use <code>strings</code>/<code>nm</code> to check for jemalloc symbols in your binary to triple check</p>



<a name="147603761"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/jemalloc/near/147603761" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> gnzlbg <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/jemalloc.html#147603761">(Nov 13 2018 at 16:49)</a>:</h4>
<p>e.g. <code>nm rustc | grep -E "nallocx"</code></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>